{extend name="admin/public:layout" /}
{block name="title"}会员管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> 会员列表</li>
            </ol>
        </div>
        <div class="ibox-content">
            <div class="toolbar">
                <div class="pull-left">
                    <a class="btn btn-primary" href="{:url('add')}">
                        <i class="fa fa-plus"></i>&nbsp;添加会员
                    </a>
                </div>
                <div class="pull-right">
                    <form class="form-inline" method="post">
                        <div class="form-group">
                            <select class="form-control" name="searchKey">
                                <option value="member_mobile">手机号</option>
                                <option value="member_truename">姓名</option>
                                <option value="company_name">公司名称</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <div class="input-group">
                                <input class="form-control" name="searchText" type="text" placeholder="检索关键词">
                            </div>
                        </div>
                        <button type="submit" class="btn btn-info">
                            <i class="fa fa-search"></i> 搜索
                        </button>
                    </form>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
    <div class="row">
        {volist name="list" id="vo"}
        <div class="col-sm-4">
            <div class="contact-box">
                <div class="col-sm-4">
                    <div class="text-center">
                        {empty name="vo.member_avatar"}
                        <img alt="image" class="img-circle m-t-xs img-responsive" src="/public/sex-{$vo.member_sex}.png">
                        {else/}
                        <img alt="image" class="img-circle m-t-xs img-responsive" src="{$vo.member_avatar}">
                        {/empty}
                        <div class="m-t-xs font-bold">{$vo.member_mobile}</div>
                    </div>
                </div>
                <div class="col-sm-8">
                    <h3><strong>{empty name="vo.member_truename"}匿名{else/}{:msubstr($vo['member_truename'],0,15)}{/empty}</strong></h3>
                    <address>
                        状态:{$vo['member_status']==1?'正常':'锁定'}<br>
                        上次登录时间:{gt name="vo.last_login_time" value="0"}{$vo.last_login_time|date="m-d H:i",###}{/gt}<br/>
                        上次登录IP:{$vo.last_login_ip}<br/>
                    </address>
                </div>
                <div class="text-center">
                    <a href="{:url('edit',['member_id'=>$vo['member_id']])}" class="btn btn-info">
                        <span style="color:#fff">编辑</span>
                    </a>
                    <button type="button" class="btn btn-danger" onclick="doAction(this);"
                            data-msg="确认操作吗？" data-url="{:url('del')}" data-params="member_id={$vo.member_id}&member_status={$vo['member_status']}">{eq name="vo['member_status']" value="1"}禁用{else/}启用{/eq}</button>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
        {/volist}
    </div>
    <div class="page-bar">{$list->render()}</div>
</div>
{/block}
{block name="script"}{/block}